home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
CrashBurn.sit
/
Crash & Burn
/
source code
/
flames.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-06-27
|
2KB
|
43 lines
#pragma once
#include <QDOffscreen.h>
typedef struct {
Boolean burning;
Boolean isValid;
GrafPtr flamePort; /* port where the fire is drawn */
void *flameTaskPtr;
GWorldPtr DrawingArea; /* offscreen world where fire really lives */
CTabHandle fireCLUT;
PixMapHandle offPixMap;
short maxColor;
short maxFlameWidth, /* minimum width of flames/empty spaces */
minFlameWidth; /* maximum width of flames/empty spaces */
short density, /* proportion of flames to empty spaces */
fadePerStep, /* determines longevity */
timePerFrame; /* determines maximum rate */
Rect offRect,
copyRect,
fireRect;
short BUF_WIDTH,
BUF_HEIGHT,
BitMapWidth;
unsigned char *basePixels; /* pointer to the pixmap's base address */
} FlameDataRec, *FlameDataRecPtr;
FlameDataRecPtr MakeNewFlames (GrafPtr thePort, Rect *flameBounds,
short minFlameWidth, short maxFlameWidth,
double flameDensity, double fadeRate,
short maxFPS, CTabHandle itsCLUT);
void LockFlames(FlameDataRecPtr inFlames);
void FreeFlames (FlameDataRecPtr *F);
void StartFlames (FlameDataRecPtr F);
void StopFlames (FlameDataRecPtr F);
short StepFlames(FlameDataRecPtr register F);
void ChangeFlameDensity (FlameDataRecPtr F, double newDensity);
void ChangeFlameWidth (FlameDataRecPtr F, short newMinWidth, short newMaxWidth);
void ChangeFlameFadeRate (FlameDataRecPtr F, double newFadeRate);
void ChangeFlameFPS (FlameDataRecPtr F, short newFPS);
void IdleFlames(FlameDataRecPtr F);